home *** CD-ROM | disk | FTP | other *** search
- /* Copyright 1984 by the Massachusetts Institute of Technology */
- /*
- Copyright Cornell University 1986. All rights are reserved.
-
- See notice.h
- */
-
- /* Definitions for telnet */
-
- struct ucb {
- int u_state; /* ESTAB or CLOSING */
- int u_tcpfull; /* is tcp's output buffer full? */
- int u_tftp; /* tftp acceptance */
- int u_rstate; /* Read terminal state */
- /* NORMALMODE */
- /* BLOCK - don't read terminal */
- int u_rspecial; /* Read terminal character handling */
- /* NORMALMODE */
- /* SPECIAL - processing char after prompt */
- /* CONFIRM - quit confirmation */
- /* TCPFULL - tcp output buffer full */
- int u_wstate; /* Write terminal state */
- /* NORMALMODE */
- /* URGENTM - urgent mode
- ignore nonspecial chars */
- int u_wspecial; /* Write terminal character handling */
- /* NORMALMODE */
- /* '\r' (13), IAC, WILL, WONT, DO, DONT -
- processing special chars */
- int u_prompt; /* Prompt char */
- int u_sendm; /* Send mode */
- /* EVERYC - send to net on every char */
- /* NEWLINE - send to net on newline */
- int u_echom; /* Echo mode */
- /* LOCAL - local echo */
- /* REMOTE - remote echo */
- int u_echongo; /* Echo negotiation request outstanding */
- /* NORMALMODE */
- /* LECHOREQ - IAC DONT ECHO was sent */
- /* RECHOREQ - IAC DO ECHO was sent */
- int u_mode; /* status line on or off flag */
- int u_ask; /* ask about tftp transfers */
- };
-
- #define NORMALMODE 0
- #define SPECIAL 1
- /*
- #define TEST 2
- */
- #define CONFIRM 3
- #define HOLD 4
-
- #define TFUNKNOWN 1
- #define TFWAITING 2
- #define TFYES 3
- #define TFNO 4
-
- #define BLOCK 1
- #define NOBLOCK 2
- #define URGENTM 1
- #define EVERYC 1
- #define NEWLINE 2
- #define LOCAL 1
- #define REMOTE 2
- #define LECHOREQ 1
- #define RECHOREQ 2
-
- #define TNEOR 0xef
- #define TNSBEND 0xf0
- #define TNDM 242
- #define TNBREAK 243
- #define TNINT 244
- #define TNAO 245
- #define TNAYT 246
- #define TNERCH 247
- #define TNERLN 248
- #define TNGA 249
- #define TNSB 250
- #define TNWILL 251
- #define TNWONT 252
- #define TNDO 253
- #define TNDONT 254
- #define TNIAC 255
-
- /* options */
-
- #define TNIS 0
- #define TNSEND 1
-
- #define OPTBINARY 0
- #define OPTECHO 1
- #define OPTSPGA 3
- #define OPTTM 6
- #define OPTTERMTYPE 24
- #define OPTEOR 25
- #define OPT3270REGIME 29
-
- #define DFESC '\036' /* default escape char */
-
- #define TELNETSOCK 23 /* Telnet well known socket no. */
-
- extern struct ucb ucb;
-
- /* need array of states for ucb.state? */
- #define CLOSING 1
-
-
- /* new for MacTCP */
-
-
- #ifdef MACTCP
- /* supply defines for MacTCP version which would otherwise be in net.h */
-
- #ifdef NOTMERGED
- typedef long in_name;
-
- struct net {
- long ip_addr;
- long n_defgw;
- };
-
- extern struct net thisnet;
- extern struct net * rnet;
- #endif
-
- extern short nnrup;
-
- /* supply defines which would otherwise be in tcp.h */
- extern unsigned long in_cnt;
- extern unsigned long out_cnt; /* # of packets seen */
-
- /* a structure to hold a IPaddr/TCP socket */
-
-
- #ifndef MULTI
- struct hostsock {
- union {
- char bytes[4];
- unsigned long addr;
- } u;
- unsigned port; /* TCP port to connect to */
- short hostconnact; /* ID of actions to execute after host connection complete */
- };
- #endif
-
- #endif
- extern int vt100();
- extern int vt100str();
- extern int h19();
- extern int h19str();
-
-